﻿Public Class Nvehiculo

    Private objrodado As Datos.Dvehiculo

    Public Sub New()
        objrodado = New Datos.Dvehiculo
    End Sub

    Public Function guardarvehiculo(ByVal item As Entidades.Evehiculo) As Boolean
        Dim oDatos As New Datos.Dvehiculo
        Dim oVehiculos As New List(Of Entidades.Evehiculo)
        Dim band As Boolean
        Try
            band = oDatos.guardar(item)
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
        Return band
    End Function

    Public Function eliminarvehiculo(ByVal item As Entidades.Evehiculo) As Boolean
        Dim oDatos As New Datos.Dvehiculo
        Dim oVehiculos As New List(Of Entidades.Evehiculo)
        Dim band As Boolean
        Try
            band = oDatos.guardar(item)
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
        Return band
    End Function

    Public Function modificarvehiculo(ByVal Vehiculos As Entidades.Evehiculo) As Boolean
        Dim oDatos As New Datos.Dvehiculo
        Dim oVehiculos As New List(Of Entidades.Evehiculo)
        Dim band As Boolean
        Try
            band = oDatos.modificar(Vehiculos)
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
        Return band
    End Function


    Public Function buscarvehiculos(ByVal texto As String) As DataTable

        Dim oDatos As New Datos.Dvehiculo
        Try
            Return oDatos.buscar(texto)
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
    End Function
End Class



